<?php
namespace zake\foundation\able\reactor;

use zake\foundation\able\stream\RwBufferAble;


interface ConnectAble extends RwBufferAble
{

    public function getConnectId();

    public function setConnectId($connectId);

    public function getConnectTime($microTime=false);

    public function setListener(ListenAble $listener);

    public function getListener();

    public function getChannel();


    /**
     * 注册事件侦听
     * @param $eventType
     * @param \Closure $callBack
     *
     * @author liu.bin 2020-09-04 11:29
     */
    public function addEventListener($eventType,\Closure $callBack);
}